﻿using System;
using System.Web.UI.WebControls;

namespace dcwj
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //密码获取焦点
                string focus = "document.getElementById('" + Login1.ClientID + "_Password').focus();";
                ClientScript.RegisterStartupScript(typeof(Login), "uidFocus", focus, true);
            }
        }

        protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
        {
            if (Login1.Password.Equals("dcwj")&&Login1.UserName.Equals("admin"))
            {
                Response.Redirect("index.aspx");
            }
        }
    }
}